#include "Dice.h"
#include <iostream>
#include <stdlib.h>
using namespace std;


Dice::Dice(void)
{
}


Dice::~Dice(void)
{
}


int  Dice::throwdice()
{
	return x = (rand()%6 + 1);
}


void Dice::printdice()
{
	if(x==1){
		cout<<"---------\n";
		cout<<"!       !\n";
		cout<<"!   *   !\n";
		cout<<"!       !\n";
		cout<<"---------\n";
	}

	if(x==2){
		cout<<"---------\n";
		cout<<"!*      !\n";
		cout<<"!       !\n";
		cout<<"!      *!\n";
		cout<<"---------\n";
	}

	if(x==3){
		cout<<"---------\n";
		cout<<"!*      !\n";
		cout<<"!   *   !\n";
		cout<<"!      *!\n";
		cout<<"---------\n";
	}

	if(x==4){
		cout<<"---------\n";
		cout<<"!*     *!\n";
		cout<<"!       !\n";
		cout<<"!*     *!\n";
		cout<<"---------\n";
	}

	if(x==5){
		cout<<"---------\n";
		cout<<"!*     *!\n";
		cout<<"!   *   !\n";
		cout<<"!*     *!\n";
		cout<<"---------\n";
	}

	if(x==6){
		cout<<"---------\n";
		cout<<"!*     *!\n";
		cout<<"!*     *!\n";
		cout<<"!*     *!\n";
		cout<<"---------\n";
	}
}